Bentley Map V8i (SELECTseries 10) Help

Database Variables

When an element is validated in a script, the database attributes associated with the element are automatically read and stored in database variables that can be used in the script for viewing and updating the database attributes. A database variable uses the name of the database table and column separated by a period (“.”).

Example:

The table PIPE contains a column named MATERIAL and a column named DIMENSION. Use PIPE.MATERIAL and PIPE.DIMENSION the database variables.

The type of attribute in the database defines the type of database variable.

A SQL command uses database functions to select data other than simple rows and column values. The resulting value is also stored in a database variable.

Example: select max(DIMENSION) from PIPE

The resulting database variable is PIPE.MAX_DIMENSION.

Note: Some SQL functions cannot be referred to using a database variable with a name. The variable will be named by the tablename followed by a period and exprN where N is a number.

Example: select (a+b) , (a*b) from sometable

The database variable results are SOMETABLE.EXPR1 and SOMETABLE.EXPR2.

Some databases allow to use an alias for the results. In this case, the name of the alias will be used instead.

Example: select (a+b) sum, (a*b) product from sometable

The database variables results are SOMETABLE.sum and SOMETABLE.product.